#ifndef HEALTH_API_H
#define HEALTH_API_H

#include "common.h"
#include <stddef.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _hourly_data {
  uint64_t ts;
  double avg_hr;
  size_t len;
  smp_hr_t *hr_list;
} hourly_data_t;

/*
心率滤波
@param count: hourly_data_t节点个数
 */
EXPORT hourly_data_t *run_hourly_data(smp_hr_t *hr_list, size_t len,
                                      uint32_t *count);
/*
释放内存
 */
EXPORT void free_hourly(hourly_data_t *hlist, size_t count);

#ifdef __cplusplus
}
#endif

#endif